//菜单管理相关接口
import request from '@/utils/request'
import type { PermisstionResponseData,MenuParams } from './type'

//全部菜单列表接口
export const reqAllPermissionAPI = () =>
  request.get<any, PermisstionResponseData>(`/admin/acl/permission`)

//新增或者修改菜单接口
export const reqAddOrUpdatePermissionAPI = (data: MenuParams) => {
  if (data.id) {
    return request.put<any, any>(`/admin/acl/permission/update`, data)
  } else {
    return request.post<any, any>(`/admin/acl/permission/save`, data)
  }
}
//删除菜单接口
export const reqDeletePermissionAPI = (id: number) =>
  request.delete<any, any>(`/admin/acl/permission/remove/${id}`)

//测试第二遍
